#pragma once 
#include <map>
#include <string>
#include "Product.h"
#include <memory>
namespace Framework
{
    class Manager
    {
    private:
        std::map<std::string, std::unique_ptr<Product>> showcase;
    public:
        /* object input */
        inline void makeRegister(const std::string& key, std::unique_ptr<Product> prototype)
        {
            showcase[key] = std::move(prototype);
        }
        /* object output */
        std::unique_ptr<Product> createClone(const std::string& key)
        {
            if(showcase.find(key) != showcase.end())
                return showcase[key]->clone();
            return nullptr;
        }
    };
};